package com.zmn.oms.model.entity.comment;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.zmn.oms.model.entity.work.OrderBaseEsQuery;
import com.zmn.oms.model.es.ZmnEsFieldType;
import com.zmn.oms.model.es.ZmnToEs;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.List;

/**
 * 类描述： 查询工单评价
 *
 * @author lujia
 * @date 2018/11/23 20:01
 */
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class OrderCommentEsQuery extends OrderBaseEsQuery {

    /**
     * 公司Id
     */
    @ZmnToEs(map = "companyId", type = ZmnEsFieldType.Integer)
    private Integer companyId;

    /**
     * 服务商Id list
     */
    @ZmnToEs(map = "manageCompanyId", type = ZmnEsFieldType.Arr)
    private List<Integer> manageCompanyIdList;

    /**
     * 公司Id
     */
    @ZmnToEs(map = "manageCompanyId", type = ZmnEsFieldType.Integer)
    private Integer manageCompanyId;

    /**
     * 工单省份
     */
    @ZmnToEs(map = "provinceId", type = ZmnEsFieldType.Arr)
    private List<Integer> provinceIdList;

    /**
     * 工单城市
     */
    @ZmnToEs(map = "cityId", type = ZmnEsFieldType.Arr)
    private List<Integer> cityIdList;

    /**
     * 产品Id
     */
    @ZmnToEs(map = "productId", type = ZmnEsFieldType.Integer)
    private Integer productId;

    /**
     * 产品Id集合
     */
    @ZmnToEs(map = "productId", type = ZmnEsFieldType.Arr)
    private List<Integer> productIdList;

    /**
     * 前台产品Id
     */
    @ZmnToEs(map = "showProductId", type = ZmnEsFieldType.Integer)
    private Integer showProductId;

    /**
     * 前台产品Id集合
     */
    @ZmnToEs(map = "showProductId", type = ZmnEsFieldType.Arr)
    private List<Integer> showProductIdList;

    /**
     * 前台产品一级分类id
     */
    @ZmnToEs(map = "showCategOneId", type = ZmnEsFieldType.Integer)
    private Integer showCategOneId;

    /**
     * 前台产品一级分类id
     */
    @ZmnToEs(map = "showCategOneId", type = ZmnEsFieldType.Arr)
    private List<Integer> showCategOneIdList;

    /**
     * 前台产品二级分类id
     */
    @ZmnToEs(map = "showCategId", type = ZmnEsFieldType.Integer)
    private Integer showCategTwoId;

    /**
     * 前台产品二级分类id
     */
    @ZmnToEs(map = "showCategId", type = ZmnEsFieldType.Arr)
    private List<Integer> showCategTwoIdList;

    /**
     * 工程师Id
     */
    @ZmnToEs(map = "masterId", type = ZmnEsFieldType.Integer)
    private Integer masterId;

    /**
     * 工单号code
     */
    @ZmnToEs(map = "orderId", type = ZmnEsFieldType.Long)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long code;

    /**
     * 工单号后六位
     */
    @ZmnToEs(map = "codeEnd6", type = ZmnEsFieldType.Text)
    private String codeEnd6;

    /**
     * 渠道id list
     */
    @ZmnToEs(map = "channelId", type = ZmnEsFieldType.Arr)
    private List<Integer> channelIdList;

    /**
     * 厂商id list
     */
    @ZmnToEs(map = "factoryId", type = ZmnEsFieldType.Arr)
    private List<Integer> factoryIdList;

    /**
     * 用户评星
     */
    @ZmnToEs(map = "commentScore", type = ZmnEsFieldType.Integer)
    private Integer commentScore;

    /**
     * 评价方式
     */
    @ZmnToEs(map = "type", type = ZmnEsFieldType.Integer)
    private Integer commentType;

    /**
     * 服务分类
     */
    @ZmnToEs(map = "servCategId", type = ZmnEsFieldType.Arr)
    private List<Integer> servCategId;

    /**
     * 一级分类
     */
    @ZmnToEs(map = "categOneId", type = ZmnEsFieldType.Arr)
    private List<Integer> categOneIdList;

    /**
     * 二级分类
     */
    @ZmnToEs(map = "categId", type = ZmnEsFieldType.Arr)
    private List<Integer> categTwoIdList;

    /**
     * 工单结果状态
     */
    @ZmnToEs(map = "resultStatus", type = ZmnEsFieldType.Integer)
    private Integer workResultStatus;

    /**
     * 是否回访 1 no 2 yes
     */
    @ZmnToEs(map = "isReply", type = ZmnEsFieldType.Boolean)
    private Integer replyVisited;

    /**
     * 是否追评 1 no 2 yes
     */
    @ZmnToEs(map = "isAppend", type = ZmnEsFieldType.Boolean)
    private Integer append;

    /**
     * 是否回复评价 1 no 2 yes
     */
    @ZmnToEs(map = "isReplyComment", type = ZmnEsFieldType.Boolean)
    private Integer replyCommented;

    /**
     * 是否成功单 1 no 2 yes
     */
    private Integer successOrder;

    /**
     * 上门时间 startTime,endTime
     */
    @ZmnToEs(map = "visitTime", type = ZmnEsFieldType.Date)
    private String visitTime;

    /**
     * 派单时间 startTime,endTime
     */
    @ZmnToEs(map = "distributeTime", type = ZmnEsFieldType.Date)
    private String distributeTime;

    /**
     * 评价时间 startTime,endTime
     */
    @ZmnToEs(map = "commentTime", type = ZmnEsFieldType.Date)
    private String commentTime;

    /**
     * 评星范围 startScore,endScore
     */
    @ZmnToEs(map = "commentScore", type = ZmnEsFieldType.IntegerRange)
    private String scoreRange;

    /**
     * 店铺ID
     */
    @ZmnToEs(map = "shopId", type = ZmnEsFieldType.Integer)
    private Integer shopId;

    /**
     * 店铺类型
     */
    @ZmnToEs(map = "shopType", type = ZmnEsFieldType.Integer)
    private Integer shopType;

}
